<template>
  <div class="home">
    <button @click="miuns" :disabled="count <= 1">-</button>
    {{ count }}
    <button @click="add">+</button>
    <br>
    {{ abc }}
    <button @click="updateAsds">update</button>
  </div>
</template>

<script>
import { mapState, mapActions } from "vuex";
export default {
  dara() {
    return {};
  },
  computed: {
    ...mapState("count", {
      count: (state) => state.count,
    }),
    ...mapState("asds", {
      abc: (state) => state.abc,
    }),
  },
  methods: {
    ...mapActions("count", ["addCountAsync", "miunsCountAsync"]),
    ...mapActions('asds',['updateAbcAsync']),
    add() {
      this.addCountAsync();
    },
    miuns() {
      this.miunsCountAsync();
    },
    updateAsds(){
      this.updateAbcAsync('abcd')
    }
  },
};
</script>
